﻿
Namespace PL.MESSDK
    Public Class Routing_PL
        Inherits PLBase

        Private _aQueryName As String

        Public Sub New(ByVal queryName As String)
            MyBase.New(queryName)
            _aQueryName = queryName
        End Sub


        Sub OnRowUpdating(ByVal sender As Object, ByVal e As SqlRowUpdatingEventArgs) Handles MetaDataTable.OnRowUpdating
        End Sub
        Public Overrides Function Validate() As Boolean
            'Throw New NotImplementedException("Validate To Come...")
            Return True
        End Function
        Public Overrides Function Delete() As Boolean
            'Throw New NotImplementedException("Delete To Come...")
            Return False
        End Function

        Public Shared Function GetRoutingByID(ByVal routingID As Guid) As DataRow
            Dim aRow As DataRow = Nothing
            Using op As MetaQuery = MetaQuery.GetMetaQueryByName("Routing")
                op.SQLWhere = String.Format("RoutingId = '{0}'", routingID.ToString)
                op.FillResultQuery()
                If op.ResultQuery.Rows.Count > 0 Then
                    aRow = op.ResultQuery.Rows(0)
                End If
                Return aRow
            End Using
        End Function
    End Class
End Namespace
